package com.sskj.wallet.presenter;

import com.hjq.toast.ToastUtils;
import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.wallet.ui.activity.AddAddressActivity;


/**
 * @author Hey
 * Create at  2019/06/26
 */
public class AddAddressPresenter extends BasePresenter<AddAddressActivity> {

    public void addAddress(String address, String type, String note, String coin) {
        httpService.addAddress(address, type, note, coin)
                .tag(this)
                .execute(new JsonCallBack<HttpData>(this) {
                    @Override
                    public void onSuccess(Response<HttpData> response) {
                        ToastUtils.show(response.body().getMsg());
                        mView.finish();
                    }
                });
    }
}
